package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.XxSectionPlanMapper;
import com.ruoyi.system.domain.XxSectionPlan;
import com.ruoyi.system.service.IXxSectionPlanService;
import com.ruoyi.common.core.text.Convert;

/**
 * 水泥目标产值Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-20
 */
@Service
public class XxSectionPlanServiceImpl implements IXxSectionPlanService 
{
    @Autowired
    private XxSectionPlanMapper xxSectionPlanMapper;

    /**
     * 查询水泥目标产值
     * 
     * @param id 水泥目标产值主键
     * @return 水泥目标产值
     */
    @Override
    public XxSectionPlan selectXxSectionPlanById(Integer id)
    {
        return xxSectionPlanMapper.selectXxSectionPlanById(id);
    }

    /**
     * 查询水泥目标产值列表
     * 
     * @param xxSectionPlan 水泥目标产值
     * @return 水泥目标产值
     */
    @Override
    public List<XxSectionPlan> selectXxSectionPlanList(XxSectionPlan xxSectionPlan)
    {
        return xxSectionPlanMapper.selectXxSectionPlanList(xxSectionPlan);
    }

    /**
     * 新增水泥目标产值
     * 
     * @param xxSectionPlan 水泥目标产值
     * @return 结果
     */
    @Override
    public int insertXxSectionPlan(XxSectionPlan xxSectionPlan)
    {
        xxSectionPlan.setCreateTime(DateUtils.getNowDate());
        return xxSectionPlanMapper.insertXxSectionPlan(xxSectionPlan);
    }

    /**
     * 修改水泥目标产值
     * 
     * @param xxSectionPlan 水泥目标产值
     * @return 结果
     */
    @Override
    public int updateXxSectionPlan(XxSectionPlan xxSectionPlan)
    {
        xxSectionPlan.setUpdateTime(DateUtils.getNowDate());
        return xxSectionPlanMapper.updateXxSectionPlan(xxSectionPlan);
    }

    /**
     * 批量删除水泥目标产值
     * 
     * @param ids 需要删除的水泥目标产值主键
     * @return 结果
     */
    @Override
    public int deleteXxSectionPlanByIds(String ids)
    {
        return xxSectionPlanMapper.deleteXxSectionPlanByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除水泥目标产值信息
     * 
     * @param id 水泥目标产值主键
     * @return 结果
     */
    @Override
    public int deleteXxSectionPlanById(Integer id)
    {
        return xxSectionPlanMapper.deleteXxSectionPlanById(id);
    }
}
